import request from "@/utils/request";

// 查询业绩目标设置列表
export function listBizDeptTarget(query) {
  return request({
    url: "/biz/bizDeptTarget/list",
    method: "get",
    params: query,
  });
}

// 查询业绩目标设置详细
export function getBizDeptTarget(id) {
  return request({
    url: "/biz/bizDeptTarget/" + id,
    method: "get",
  });
}

// 新增业绩目标设置
export function addBizDeptTarget(data) {
  return request({
    url: "/biz/bizDeptTarget",
    method: "post",
    data: data,
  });
}

// 修改业绩目标设置
export function updateBizDeptTarget(data) {
  return request({
    url: "/biz/bizDeptTarget",
    method: "put",
    data: data,
  });
}

// 删除业绩目标设置
export function delBizDeptTarget(id) {
  return request({
    url: "/biz/bizDeptTarget/" + id,
    method: "delete",
  });
}

// 查询最大编号
export function findMaxSort() {
  return request({
    url: "/biz/bizDeptTarget/findMaxSort",
    method: "get",
  });
}
// 导出业绩目标设置
export function exportBizDeptTarget(query) {
  return request({
    url: "/biz/bizDeptTarget/export",
    method: "get",
    params: query,
  });
}

// 查询首页业绩目标
export function getIndexTarGetInfo(query) {
  return request({
    url: "/biz/bizDeptTarget/getIndexTarGetInfo",
    method: "get",
    params: query,
  });
}
